Method Dispatch for Multi-Method Object-Oriented Languages

نویسندگان

  • Wade Holst
  • Duane Szafron
  • Yuri Leontiev
  • Candy Pang
چکیده

Two new techniques for multi-method dispatch are presented, both sufficiently general to apply to reflexive languages where methods and types can be added and removed at run-time. However, these techniques also apply to non-reflexive languages. One of the techniques operates by performing projections onto single-receiver dispatch tables, and thus benefits from existing research into single-receiver dispatch techniques. It provides method dispatch in O(k), where k is the arity of the method, and it is up to 6 times more space efficient than current table-based techniques. The second new technique does not provide constant-time dispatch, but has very low memory requirements and performs favorably against other techniques at a large percentage of call-sites. It is meant to be used as a replacement for inheritance lookup as the cache-miss algorithm in existing cache-based techniques.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Fast Algorithms for Compressed Multi-Method Dispatch Tables Generation

The eeciency of dynamic dispatch is a major impediment to the adoption of multi-methods in object-oriented languages. In this paper, we propose a simple multi-method dispatch scheme based on compressed dispatch tables. This scheme is applicable to any object-oriented language using a method precedence order that satisses a speciic monotonous property (e.g., as Cecil and Dylan), and guarantees t...

متن کامل

Inheritance Management and Method Dispatch in Reeexive Object-oriented Languages

A collection of algorithms and data structures are presented which represent a generalized framework for inheritance management and method dispatch in reeexive, dynamically typed, single-receiver languages with type/implementation-paired multiple inheritance. By storing a small amount of information, the algorithms can incrementally maintain the entire dispatch environment during the four funda...

متن کامل

Object-Oriented Multi-Methods in Cecil

Multiple dispatching provides increased expressive power over single dispatching by guiding method lookup using the values of all arguments instead of only the receiver. However, existing languages with multiple dispatching do not encourage the dataabstraction-oriented programming style that is encouraged by traditional single-dispatching languages; instead existing multiple-dispatching languag...

متن کامل

Prototypes with Multiple Dispatch: An Expressive and Dynamic Object Model

Two object-oriented programming language paradigms— dynamic, prototype-based languages and multi-method languages— provide orthogonal benefits to software engineers. These two paradigms appear to be in conflict, however, preventing engineers from realizing the benefits of both technologies in one system. This paper introduces a novel object model, prototypes with multiple dispatch (PMD), which ...

متن کامل

A General Framework for Inheritance Management and Method Dispatch in Object-Oriented Languages

This paperpresents the DT Framework, a collection of object-oriented classes representing a generalized framework for inheritance management and table-based method dispatch. It demonstrates how most existing table-based dispatch techniques can be generalized and made incremental, so that relevant entries in the dispatch table are modified each time a selector or class hierarchy link is added or...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007